/**
 * Anderground project - Subway maps processor application.
 * Copyright (C) 2008 Maksim Tkatchenko
 * Copyright (C) 2008-2009 Eldar Abusalimov, Ilya Shurigyn
 * 
 * This file is part of Anderground.
 * 
 * Anderground is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * Anderground is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Anderground.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.anderground.core.graphics;

import org.anderground.core.graphics.factories.PaintFactory;
import org.anderground.internal.graphics.abstaractions.AbstractPaint;
import org.anderground.internal.graphics.abstaractions.Delegator;

public class Paint extends Delegator<AbstractPaint> implements AbstractPaint {

	public Paint() {
		setDelegate(PaintFactory.getFactory().create());
	}

	public int getColor() {
		return getDelegate().getColor();
	}

	public void setAlpha(int a) {
		getDelegate().setAlpha(a);
	}

	public void setAntiAlias(boolean aa) {
		getDelegate().setAntiAlias(aa);
	}

	public void setARGB(int a, int r, int g, int b) {
		getDelegate().setARGB(a, r, g, b);
	}

	public void setColor(int color) {
		getDelegate().setColor(color);
	}

	public PathEffect setPathEffect(PathEffect effect) {
		if (effect == null)
			effect = new PathEffect();
		return getDelegate().setPathEffect(effect);
	}

	public void setShader(Shader shader) {
		getDelegate().setShader(shader);
	}

	public void setStrokeCap(Cap capFlag) {
		getDelegate().setStrokeCap(capFlag);
	}

	public void setStrokeWidth(float width) {
		getDelegate().setStrokeWidth(width);
	}

	public void setStyle(Style style) {
		getDelegate().setStyle(style);
	}

	public void setTextSize(float textSize) {
		getDelegate().setTextSize(textSize);
	}

	public float measureText(String text) {
		return getDelegate().measureText(text);
	}

	public Cap getStrokeCap() {
		return getDelegate().getStrokeCap();
	}

	public float getStrokeWidth() {
		return getDelegate().getStrokeWidth();
	}

	public boolean isAntiAlias() {
		return getDelegate().isAntiAlias();
	}

	public float getTextSize() {
		return getDelegate().getTextSize();
	}

	public Style getStyle() {
		return getDelegate().getStyle();
	}

	public PathEffect getPathEffect() {
		return getDelegate().getPathEffect();
	}

	public Shader getShader() {
		return getDelegate().getShader();
	}

}
